package com.yeban.javase.day06.test05_package;

/**
 * @Desc TODO
 * @Author yeban
 * @Date 2025/10/14
 *
 * 1.完成基本数据类型和包装类之间的转换
 * 已知：double a = 12.5;
 * a转换为String类型后+10的结果为:12.510
 * 已知：String str = "2.8";
 * str转换为double型后+10的结果为:12.8
 */
public class test01 {

    public static void main(String[] args) {

        double a = 12.5;
        String str1 = String.valueOf(12.5);
        System.out.println("a转换为String类型后+10的结果为:" + str1 + 10);

        String str = "2.8";
        double dou = Double.parseDouble(str) + 10;
        System.out.println("str转换为double型后+10的结果为:" + dou);

    }
}
